/**
 * 
 */
package vue;

import java.awt.event.KeyEvent;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.KeyStroke;

/**
 * Le menu de l'applet
 * @author ali
 *
 */
@SuppressWarnings("serial")
public class Menu extends JMenuBar {
	
	private JMenu fichier,aide;
	private JMenuItem options,quitter,loadRom,apropos,help;
	
	
	public Menu() {
		fichier = new JMenu("Fichier");
		aide = new JMenu("Aide");
		options= new JMenuItem("Options");
		quitter = new JMenuItem("Quitter");
		loadRom = new JMenuItem("Charger ROM");
		apropos = new JMenuItem("A propos");
		help = new JMenuItem("?");
		
		fichier.setMnemonic('F');
		this.add(fichier);
		aide.setMnemonic('A');
		this.add(aide);
		
		loadRom.setMnemonic('N');
		loadRom.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_L,KeyEvent.CTRL_MASK));
		fichier.add(loadRom);
		
		options.setMnemonic('O');
		options.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,KeyEvent.CTRL_MASK));
		fichier.add(options);
		
		quitter.setMnemonic('Q');
		quitter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,KeyEvent.CTRL_MASK));
		fichier.add(quitter);
		
		help.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,KeyEvent.CTRL_MASK));
		aide.add(help);
		
		apropos.setMnemonic('P');
		aide.add(apropos);
		
	}


	
	/**
	 * @return
	 */
	public JMenu getFichier() {
		return fichier;
	}


	/**
	 * @return
	 */
	public JMenu getAide() {
		return aide;
	}


	/**
	 * @return
	 */
	public JMenuItem getOptions() {
		return options;
	}


	/**
	 * @return
	 */
	public JMenuItem getQuitter() {
		return quitter;
	}


	/**
	 * @return
	 */
	public JMenuItem getLoadRom() {
		return loadRom;
	}


	/**
	 * @return
	 */
	public JMenuItem getApropos() {
		return apropos;
	}


	/**
	 * @return
	 */
	public JMenuItem getHelp() {
		return help;
	}
	
	

}
